package edu.cmu.mism.dgjava.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import edu.cmu.mism.dgjava.views.GraphicResults;
import edu.cmu.mism.dgjava.views.OptionDataView;
import edu.cmu.mism.dgjava.views.UnderlyingDataView;

/**
 * 
 * @author tqiu
 * 
 */
public class EquityIndexFXFuturesOptionsPerspective implements
		IPerspectiveFactory {

	public static final String PERSPECTIVE_ID = "DGJava.perspective.efifo";

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui
	 * .IPageLayout)
	 */
	public void createInitialLayout(IPageLayout layout) {
		layout.setEditorAreaVisible(false);
		layout.setFixed(true);

		layout.setEditorAreaVisible(false);

		// Put Underlying Data view on upper left region
		IFolderLayout leftFolder = layout.createFolder("leftFolder",
				IPageLayout.LEFT, new Float(0.55).floatValue(),
				IPageLayout.ID_EDITOR_AREA);

		leftFolder.addView(UnderlyingDataView.ID);

		// Put Option Data View on bottom left region
		IFolderLayout leftBottom = layout.createFolder("leftBottomFolder",
				IPageLayout.BOTTOM, new Float(0.67).floatValue(),
				UnderlyingDataView.ID);

		leftBottom.addView(OptionDataView.ID);

		// Put Graphics View on right region
		IFolderLayout right = layout.createFolder("rightFolder",
				IPageLayout.RIGHT, new Float(0.4).floatValue(),
				IPageLayout.ID_EDITOR_AREA);

		right.addView(GraphicResults.ID);


		// bottomFolder.addView(FinancialsView.ID_VIEW);
		// rightFolder.addView(ServicesView.ID_VIEW);

		// layout.getViewLayout(ActivitiesView.ID_VIEW).setCloseable(false);
	}

}
